<?php
	setlocale (LC_CTYPE, 'C');
	if ($_SERVER['HTTP_HOST']!="localhost") {
		error_reporting(0);
		$DBHost = "db2481.perfora.net";
		$DBUsername = "dbo332650693";
		$DBPassword = "textpad";
		$DBDatabase = "db332650693";
		$DBConnection = false;
		$DBSelectDB = false;
	} else {
		$DBHost = "localhost";
		$DBUsername = "root";
		$DBPassword = "";
		$DBDatabase = "thetextpad";
		$DBConnection = false;
		$DBSelectDB = false;
	}
	
	$baseTitle = "theTextPad";
	//Include trailing slash
	$baseUrl = "http://localhost/"; //"http://thetextpad.linearleash.com/";
	
	$views = array();
	$views["404"] = array("key"=>"404", "path"=>"views/404.view.php", "requireAuthentication"=>false, "title"=>$baseTitle." - Not Found");
	$views["login"] = array("key"=>"login", "path"=>"views/login.view.php", "requireAuthentication"=>false, "title"=>$baseTitle." - Login");
	$views["forgot"] = array("key"=>"forgot", "path"=>"views/forgot.view.php", "requireAuthentication"=>false, "title"=>$baseTitle." - Forgot Your Password?");
	$views["signup"] = array("key"=>"signup", "path"=>"views/signup.view.php", "requireAuthentication"=>false, "title"=>$baseTitle." - Sign Up");
	$views["main"] = array("key"=>"main", "path"=>"views/padboard.view.php", "requireAuthentication"=>true, "title"=>$baseTitle);
	$views["terms"] = array("key"=>"terms", "path"=>"views/terms.view.php", "requireAuthentication"=>false, "title"=>$baseTitle." - Terms of Use");
	
	$handlers = array();
	$handlers["login"] = array("key"=>"login", "path"=>"handlers/login.handler.php", "succeedView"=>"main", "failView"=>"login", "requireAuthentication"=>false);
	$handlers["signup"] = array("key"=>"signup", "path"=>"handlers/signup.handler.php", "succeedView"=>"main", "failView"=>"signup", "requireAuthentication"=>false);
	$handlers["forgot"] = array("key"=>"forgot", "path"=>"handlers/forgot.handler.php", "succeedView"=>"login", "failView"=>"forgot", "requireAuthentication"=>false);
?>